# 9.6(改自9.4)
class Restaurant:
    def __init__(self,restaurant_name,restaurant_type):
        self.name = restaurant_name.title()
        self.type = restaurant_type
        
        self.number_of_diners = 0

    def describe_restaurant(self):
        print(f"{self.name} would serves wonderful {self.type}.")

    def open_restaurant(self):
        print(f"{self.name} is open. Come on in.")

    def set_number_served(self,number_served):
        self.number_of_diners = number_served

    def increment_number_served(self,prople):
        self.number_of_diners += prople


class IcecreamStand(Restaurant):

    def __init__(self,restaurant_name,restaurant_type):
        super().__init__(restaurant_name,restaurant_type)
        self.flavors = []

    def show_flavors(self):
        print(f"We have the following flavors available:")
        for flavor in self.flavors:
            print(f"{flavor.title()}")
            
first = IcecreamStand('KFC','icecream') 
first.flavors = ['vanilla', 'chocolate', 'black cherry']

first.describe_restaurant()
first.show_flavors()


